<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三行flex</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        html,body{
            height: 100%;
        }
        .box{
            height: 100%;
            display: flex;
            flex-direction: column;
        }
        .one,.three{
            height: 100px;
            background: firebrick;
        }
        .two{
            flex:1;
            background: hotpink;
        }
    </style>
</head>
<body>
    <!-- 使用flex布局 -->
    <div class="box">
        <div class="one"></div>
        <div class="two"></div>
        <div class="three"></div>
    </div>
</body>
</html>